package org.dromara.bean.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;


import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品spu对象 his_goods
 *
 * @author Lion Li
 * @date 2024-12-13
 */
@Data
@TableName("his_goods")
public class HisGoods  {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品名称
     */
    private String title;

    /**
     * 商品标签
     */
    private String labels;

    @TableField(exist = false)
    private String[] label;

    /**
     * 售价
     */
    private BigDecimal price;

    /**
     * 原价
     */
    private BigDecimal originalPrice;

    /**
     * 详情图
     */
    private String detailImage;

    /**
     * 展示图
     */
    private String photo;

    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "photo")
    @TableField(exist = false)
    private String photoUrl;

    /**
     * 状态
     */
    private String listing;

    /**
     * 删除标识
     */
    @TableLogic
    private Long delFlag;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    /**
     * 后台销量
     */
    private String virtuals;

    /**
     * 销量
     */
    private int sales;
}
